package com.example.scala.chapter2

/**
 *
 * Description:
 *
 * Create by lucienoz on 2021/10/12.
 * Copyright © 2021 lucienoz. All rights reserved.
 */
object chapter02 {



  def main(args : Array[String]) : Unit = {
    //变量初始化必须要初始化
    //可变变量
    var name:String = "foo"

    //不可变变量
    val bar : String = null

    val foo : User = new User ( "foo" )

  }

}
class User(name :String){
  //可变
  var age:Int = 0;
  //不可变
  val gender:String = null;
}